-
-
Notifications
You must be signed in to change notification settings - Fork 179
Buerklin provider #1151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buerklin provider #1151
Conversation
Fixed Typo enviroment
…server into Buerklin-provider
Use Autowire to use values of environment variables Remove unwanted Code from LCSC-Provider Map json response to DTO variables
Ensure array keys exist before accessing them Optimize API calls to prevent unnecessary requests Improve error handling for better debugging Enhance readability and maintainability of functions
Buerklin provider
Change Order of Capabilities
# Conflicts: # .docker/symfony.conf # VERSION
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1151 +/- ##
============================================
+ Coverage 58.33% 58.43% +0.09%
- Complexity 7302 7396 +94
============================================
Files 580 581 +1
Lines 23228 23534 +306
============================================
+ Hits 13549 13751 +202
- Misses 9679 9783 +104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Removed OAuthTokenManager mock from BuerklinProviderTest setup.
…9c8c4470476a70b6f398e3d545550#r2622249199 Revert "Change order of capabilities in LCSCProvider.php" This reverts commit dfd6f33.
…9c8c4470476a70b6f398e3d545550#r2622249861 Revert "Change order of capabilities in PollinProvider.php" This reverts commit fc2e726.
…improve disabled_help
…AuthTokenManager Revert "add use OAuthTokenManager and create instance in constructor"This reverts commit 2a1e7c9.Revert "Add missing ) to retrieveROPCToken"This reverts commit 8df5cfc. Revert "Implement retrieveROPCToken as proposed in Part-DB#1151 (comment)" This reverts commit 66cc732.
|
Thanks. I am also not a huge fan of this OAuth token mechanism, but for now this is fine, and without an api token im not able to find a better solution for this. |
This pull request implements the Buerklin API and as Information Provider that also implements the BatchInfoProviderInterface.
Bürklin also offers an API. (Apply here: https://www.buerklin.com/de/services/eprocurement/)
Authorization works via Bearer Token that is requested via a POST-action to https://www.buerklin.com/authorizationserver/oauth/token/ and the following parameters:
client_id:cws-client
client_secret:{{PROVIDER_BUERKLIN_SECRET}}
grant_type:password
username:{{PROVIDER_BUERKLIN_USERNAME}}
password:{{PROVIDER_BUERKLIN_PASSWORD}}
There are only two GET-actions available:
Product search (example with the part number 66S447): https://www.buerklin.com/buerklinws/v2/buerklin/products/66S447/?curr=EUR&language=de
Free text search (example with the query string 'Resistor'): https://www.buerklin.com/buerklinws/v2/buerklin/products/search/?curr=EUR&language=en&pageSize=50¤tPage=0&query=Resistor&sort=relevance
I would set the parameters curr and language via PROVIDER_BUERKLIN_CURRENCY and PROVIDER_BUERKLIN_LANGUAGE.
Bürklin supplies a postman collection which I used to test the API and reverse engineer.
For reference: #868